import 'package:dk_flutter_base/dk_ui.dart';

class SingleButtonWidget extends StatelessWidget {
  //点击事件
  final VoidCallback tapAction;
  final String title;

  SingleButtonWidget({this.tapAction,this.title = ""});
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 60,
      padding: EdgeInsets.only(left: 16, right: 16, top: 5,bottom: 5),
      decoration: new BoxDecoration(
        color: Colors.white,
        boxShadow: [
          BoxShadow(
              color: Color.fromRGBO(0, 0, 0, 0.16),
              offset: Offset(0, -1.0),
              blurRadius: 3.0,
              spreadRadius: 0.0)
        ],
      ),
      child: DkClick(
        child: Card(
          color: Color(0xff3DBCC6),
          elevation: 0.0,
          clipBehavior: Clip.antiAliasWithSaveLayer,
          shape: const RoundedRectangleBorder(
            side: BorderSide.none,
            borderRadius: BorderRadius.all(
              Radius.circular(3),
            ),
          ),
          child: Center(
            child: Text(
              this.title,
              style: TextStyle(
                color: Colors.white,
                fontSize: 16,
              ),
            ),
          ),
        ),
        onTap: () {
          this.tapAction();
        },
      ),
    );
  }
}
